<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<script type="text/javascript">
function submitTab2(){
	if($("#rate2").val() > 10){
		alertMsg.error("请正确填写折扣率");
	}else{
		$("#cdiscountTab2").submit();
	}
}
(function(){
	$("#levelSel2").attr("value",'${requestScope.cdiscount.level}');
	if('${requestScope.cdiscount.fuel}' == 'true'){
		$("input[name='cdiscount.PCdiscountFuel']:radio:eq(1)").attr("checked", "checked");
	}else{
		$("input[name='cdiscount.PCdiscountFuel']:radio:eq(0)").attr("checked", "checked");
	}
})();
</script>

<div class="pageContent">
	
	<form id="cdiscountTab2" method="post" action="<%=basePath%>cdiscount_modifyCdiscount.action" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<div class="pageFormContent" layoutH="58">
			<p>
				<label>客户类型名称：</label>
				<input type="text" name="clientClass.className" value="${requestScope.cdiscount.name}" size="30" class="required" />								
			</p>
			<p>
				<label>客户类型编号：</label>				
				<input type="text" name="clientClass.classNumber" size="30" maxlength="20" value="${requestScope.cdiscount.number}" readonly="readonly" />
			</p>
			<p>
				<label>折扣率：</label>
				<input id="rate2" type="text" name="cdiscount.PCdiscountRate" value="${requestScope.cdiscount.rate}" size="30" class="required number" />
			</p>
			<p>
				<label>晋级标准公式：</label>				
				<input type="text" name="clientClass.classStandard" value="${requestScope.cdiscount.standard}" class="required" size="30"/>								
			</p>
			<p>
				<label>级别：</label>
				<select id="levelSel2" class="combox required" name="clientClass.classLevel">
						<option value="">请选择</option>
						<option value="1">一级</option>
						<option value="2">二级</option>
						<option value="3">三级</option>
						<option value="4">四级</option>
				</select>
			</p>
			<p>
				<label>是否含燃油：</label>
				<input type="radio" name="cdiscount.PCdiscountFuel" value="false"/>不含
                <input type="radio" name="cdiscount.PCdiscountFuel" value="true"/>包含
			</p>
			<p>
				<label>说明：</label>
				<textarea cols="30" rows="5" name="clientClass.classNote">${requestScope.cdiscount.note}</textarea>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="submitTab2()">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>

